package com.cpe.transfer.feedback;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;

import com.cpe.data.domain.feedback.Feedback;
import com.cpe.data.domain.feedback.FeedbackForm;

@Component
public class FeedbackTransfer {
	/**
	 * 表单-->实体
	 */
	public Feedback toEntity(FeedbackForm form) {
		Assert.notNull(form);
		Feedback feedback = new Feedback();
		BeanUtils.copyProperties(form, feedback);
		return feedback;
	}
}
